Can wildcards be used to specify log groups in the CreateExportTask API for CloudWatch Logs?

Can wildcards be used to specify log groups in the CreateExportTask API for CloudWatch Logs?

Clock Icon2024.10.29

日本語版はこちら

The issue

I am considering using the CreateExportTask API from EventBridge Scheduler to export CloudWatch Logs.

Since there are multiple log groups I want to export, I would like to specify them all at once, but can wildcards be used to specify log groups in the CreateExportTask API?

The solution

No, wildcards cannot be used.

In the request parameter "logGroupName" of the CreateExportTask API, the following patterns can be defined, but wildcards (*) are not included.

AWS official documentation

Pattern: [.-_/#A-Za-z0-9]+

Since wildcards cannot be used, please consider specifying each log group name in multiple schedules.

Also, please note that there is a quota of one export task per account, so concurrent execution is not possible.

Therefore, you need to execute tasks at intervals.

AWS official documentation

Export task
One active (running or pending) export task at a time, per account. This quota can't be changed.

References

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.